/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
using System.Collections.Generic;

using Aliyun.Acs.Core;
using Aliyun.Acs.Core.Http;
using Aliyun.Acs.Core.Transform;
using Aliyun.Acs.Core.Utils;
using Aliyun.Acs.Smartag.Transform;
using Aliyun.Acs.Smartag.Transform.V20180313;

namespace Aliyun.Acs.Smartag.Model.V20180313
{
    public class UnicomSignConfirmRequest : RpcAcsRequest<UnicomSignConfirmResponse>
    {
        public UnicomSignConfirmRequest()
            : base("Smartag", "2018-03-13", "UnicomSignConfirm", "smartag", "openAPI")
        {
        }

		private long? resourceOwnerId;

		private string resourceOwnerAccount;

		private string ownerAccount;

		private List<TmsOrder> tmsOrders;

		private long? ownerId;

		public long? ResourceOwnerId
		{
			get
			{
				return resourceOwnerId;
			}
			set	
			{
				resourceOwnerId = value;
				DictionaryUtil.Add(QueryParameters, "ResourceOwnerId", value.ToString());
			}
		}

		public string ResourceOwnerAccount
		{
			get
			{
				return resourceOwnerAccount;
			}
			set	
			{
				resourceOwnerAccount = value;
				DictionaryUtil.Add(QueryParameters, "ResourceOwnerAccount", value);
			}
		}

		public string OwnerAccount
		{
			get
			{
				return ownerAccount;
			}
			set	
			{
				ownerAccount = value;
				DictionaryUtil.Add(QueryParameters, "OwnerAccount", value);
			}
		}

		public List<TmsOrder> TmsOrders
		{
			get
			{
				return tmsOrders;
			}

			set
			{
				tmsOrders = value;
				for (int i = 0; i < tmsOrders.Count; i++)
				{
					DictionaryUtil.Add(QueryParameters,"TmsOrder." + (i + 1) + ".TmsCode", tmsOrders[i].TmsCode);
					DictionaryUtil.Add(QueryParameters,"TmsOrder." + (i + 1) + ".SigningTime", tmsOrders[i].SigningTime);
					DictionaryUtil.Add(QueryParameters,"TmsOrder." + (i + 1) + ".TmsOrderCode", tmsOrders[i].TmsOrderCode);
					DictionaryUtil.Add(QueryParameters,"TmsOrder." + (i + 1) + ".TradeId", tmsOrders[i].TradeId);
				}
			}
		}

		public long? OwnerId
		{
			get
			{
				return ownerId;
			}
			set	
			{
				ownerId = value;
				DictionaryUtil.Add(QueryParameters, "OwnerId", value.ToString());
			}
		}

		public class TmsOrder
		{

			private string tmsCode;

			private string signingTime;

			private string tmsOrderCode;

			private string tradeId;

			public string TmsCode
			{
				get
				{
					return tmsCode;
				}
				set	
				{
					tmsCode = value;
				}
			}

			public string SigningTime
			{
				get
				{
					return signingTime;
				}
				set	
				{
					signingTime = value;
				}
			}

			public string TmsOrderCode
			{
				get
				{
					return tmsOrderCode;
				}
				set	
				{
					tmsOrderCode = value;
				}
			}

			public string TradeId
			{
				get
				{
					return tradeId;
				}
				set	
				{
					tradeId = value;
				}
			}
		}

        public override UnicomSignConfirmResponse GetResponse(UnmarshallerContext unmarshallerContext)
        {
            return UnicomSignConfirmResponseUnmarshaller.Unmarshall(unmarshallerContext);
        }
    }
}
